package br.com.center.loja.ws.dto;

import java.io.Serializable;
import java.util.Date;

import javax.xml.bind.annotation.XmlRootElement;

import br.com.center.loja.model.User;

@XmlRootElement
public class ClientDTO implements Serializable {
	
	private static final long serialVersionUID = 2L;
	
	private Long code;
	private User user;
	private String name;
	private String document;
	private String documentType;
	private AddressDTO address;
	private Date birthday;
	private String email;
	private String phone;
	
	public Long getCode() {
		return code;
	}
	
	public void setCode(Long code) {
		this.code = code;
	}
	
	public User getUser() {
      return user;
   }
	
	public void setUser(User user) {
      this.user = user;
   }
	
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getDocument() {
		return document;
	}

	public void setDocument(String document) {
		this.document = document;
	}

	public String getDocumentType() {
		return documentType;
	}

	public void setDocumentType(String documentType) {
		this.documentType = documentType;
	}

	public Date getBirthday() {
		return birthday;
	}

	public void setBirthday(Date birthday) {
		this.birthday = birthday;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}
	
	public AddressDTO getAddress() {
		return address;
	}
	
	public void setAddress(AddressDTO address) {
		this.address = address;
	}
	
	@Override
	public String toString() {
		StringBuilder builder = new StringBuilder();
		
		builder.append("Nome: ").append(getName())
		       .append(" Documento: ")
		       .append(getDocument());
		
		return builder.toString();
	}
}
